package com.yhn.hxds.common.constant;

import java.util.Arrays;
import java.util.List;

/**
 * 文件常量
 *
 * @author yhnyhn123
 */
public class FileConstant {

    public static final String FILE_UPLOAD_PATH = "furniture/upload/";

    public static final String FILE_UPLOAD_PATH_IMG = "furniture/upload/img/";

    public static final String FILE_UPLOAD_PATH_EXCEL = "furniture/upload/excel/";


    public static final String FILE_UPLOAD_PATH_PDF = "furniture/upload/pdf/";

    public static final String FILE_UPLOAD_PATH_DOC = "furniture/upload/doc/";

    public static final String FILE_UPLOAD_PATH_DOCX = "furniture/upload/docx/";

    /**
     * 图表上传文件大小限制为 5M
     */

    public static final long FILE_MAX_SIZE = 5 * 1024 * 1024L;

    /**
     * 图表上传文件后缀白名单
     */
    public static final List<String> VALID_FILE_SUFFIX = Arrays.asList("xlsx", "csv", "xls", "json", "jpg", "png", "docx", "jpeg", "pdf");

    /**
     * PDF文件上传后缀白名单
     */
    public static final List<String> VALID_PDF_SUFFIX = List.of("pdf");

    /**
     * word上传文件后缀白名单
     */
    public static final List<String> VALID_WORD_SUFFIX = Arrays.asList("docx", "doc");

    /**
     * 上传图片文件后缀白名单
     */
    public static final List<String> VALID_IMG_SUFFIX = Arrays.asList("jpg", "png", "jpeg");
}
